<!DOCTYPE html>
<html>
<head>
  <title>Puppeteer Mocha</title>
</head>
<body>
    <!-- Canvas placeholder -->
    <div id="screen"></div>
    <script type="module">
      import * as me from './lib/melonjs.module.js';

      // a custom renderer extending the default canvas one with one `isCustom` property
      class CustomRenderer extends me.CanvasRenderer {
        constructor(options) {
          super(options);
          this.type = "Custom";
          this.isCustom = true;
        }
      }

      me.boot();
      me.video.init(800, 600, {parent : "screen", scale : "auto", renderer : CustomRenderer});

      // a global reference that we can check later in the corresponding test
      globalThis.isCustomRenderer = me.game.renderer.isCustom;
  </script>
</body>
</html>